cmake_minimum_required(VERSION 3.19)

project(use_dll_cpp)
set(CMAKE_BUILD_TYPE Release)  # 配置编译类型 Debug、Release  debug检测时间比release长
set(CMAKE_CXX_STANDARD 14)

set(CMAKE_CXX_STANDARD_REQUIRED ON)

# OpenCV
# opencv下载后的路径,opencv编译路径
set(OpenCV_DIR G:/down/cpp/opencv-4.5.4/build/x64/vc15/lib)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
# 打印消息
message(STATUS "Find OpenCV include at ${OpenCV_INCLUDE_DIRS}")
message(STATUS "Find OpenCV libraries: ${OpenCV_LIBRARIES}")

add_executable(${PROJECT_NAME} detect.cpp utils.hpp)

# 链接的所有 .lib库文件
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES} )


